package com.project.mapper;

import com.project.entity.Order;
import org.apache.ibatis.annotations.Mapper;

import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

//订单操作
@Mapper
public interface OrderMapper {

    //分页查询
    public List<Order> findPage(@Param("pageIndex") Integer pageIndex,
                                @Param("pageCount") Integer pageCount,
                                @Param("type") String type);


    List<Order> findAll();

    //根据条件分页查询
    public List<Order> findPageByTitle(@Param("pageIndex") Integer pageIndex,
                                @Param("pageCount") Integer pageCount,
                                @Param("type") String type,
                                @Param("title") String title);

    //根据类型查询此类型总记录数
    public int findTypeCount(@Param("type") String type);
}
